package com.lxk.pojo;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class VipRuleExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public VipRuleExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andVipRuleIdIsNull() {
            addCriterion("vip_rule_id is null");
            return (Criteria) this;
        }

        public Criteria andVipRuleIdIsNotNull() {
            addCriterion("vip_rule_id is not null");
            return (Criteria) this;
        }

        public Criteria andVipRuleIdEqualTo(Integer value) {
            addCriterion("vip_rule_id =", value, "vipRuleId");
            return (Criteria) this;
        }

        public Criteria andVipRuleIdNotEqualTo(Integer value) {
            addCriterion("vip_rule_id <>", value, "vipRuleId");
            return (Criteria) this;
        }

        public Criteria andVipRuleIdGreaterThan(Integer value) {
            addCriterion("vip_rule_id >", value, "vipRuleId");
            return (Criteria) this;
        }

        public Criteria andVipRuleIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("vip_rule_id >=", value, "vipRuleId");
            return (Criteria) this;
        }

        public Criteria andVipRuleIdLessThan(Integer value) {
            addCriterion("vip_rule_id <", value, "vipRuleId");
            return (Criteria) this;
        }

        public Criteria andVipRuleIdLessThanOrEqualTo(Integer value) {
            addCriterion("vip_rule_id <=", value, "vipRuleId");
            return (Criteria) this;
        }

        public Criteria andVipRuleIdIn(List<Integer> values) {
            addCriterion("vip_rule_id in", values, "vipRuleId");
            return (Criteria) this;
        }

        public Criteria andVipRuleIdNotIn(List<Integer> values) {
            addCriterion("vip_rule_id not in", values, "vipRuleId");
            return (Criteria) this;
        }

        public Criteria andVipRuleIdBetween(Integer value1, Integer value2) {
            addCriterion("vip_rule_id between", value1, value2, "vipRuleId");
            return (Criteria) this;
        }

        public Criteria andVipRuleIdNotBetween(Integer value1, Integer value2) {
            addCriterion("vip_rule_id not between", value1, value2, "vipRuleId");
            return (Criteria) this;
        }

        public Criteria andVipRulePriceIsNull() {
            addCriterion("vip_rule_price is null");
            return (Criteria) this;
        }

        public Criteria andVipRulePriceIsNotNull() {
            addCriterion("vip_rule_price is not null");
            return (Criteria) this;
        }

        public Criteria andVipRulePriceEqualTo(BigDecimal value) {
            addCriterion("vip_rule_price =", value, "vipRulePrice");
            return (Criteria) this;
        }

        public Criteria andVipRulePriceNotEqualTo(BigDecimal value) {
            addCriterion("vip_rule_price <>", value, "vipRulePrice");
            return (Criteria) this;
        }

        public Criteria andVipRulePriceGreaterThan(BigDecimal value) {
            addCriterion("vip_rule_price >", value, "vipRulePrice");
            return (Criteria) this;
        }

        public Criteria andVipRulePriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("vip_rule_price >=", value, "vipRulePrice");
            return (Criteria) this;
        }

        public Criteria andVipRulePriceLessThan(BigDecimal value) {
            addCriterion("vip_rule_price <", value, "vipRulePrice");
            return (Criteria) this;
        }

        public Criteria andVipRulePriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("vip_rule_price <=", value, "vipRulePrice");
            return (Criteria) this;
        }

        public Criteria andVipRulePriceIn(List<BigDecimal> values) {
            addCriterion("vip_rule_price in", values, "vipRulePrice");
            return (Criteria) this;
        }

        public Criteria andVipRulePriceNotIn(List<BigDecimal> values) {
            addCriterion("vip_rule_price not in", values, "vipRulePrice");
            return (Criteria) this;
        }

        public Criteria andVipRulePriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("vip_rule_price between", value1, value2, "vipRulePrice");
            return (Criteria) this;
        }

        public Criteria andVipRulePriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("vip_rule_price not between", value1, value2, "vipRulePrice");
            return (Criteria) this;
        }

        public Criteria andVipRuleTimespanIsNull() {
            addCriterion("vip_rule_timespan is null");
            return (Criteria) this;
        }

        public Criteria andVipRuleTimespanIsNotNull() {
            addCriterion("vip_rule_timespan is not null");
            return (Criteria) this;
        }

        public Criteria andVipRuleTimespanEqualTo(Integer value) {
            addCriterion("vip_rule_timespan =", value, "vipRuleTimespan");
            return (Criteria) this;
        }

        public Criteria andVipRuleTimespanNotEqualTo(Integer value) {
            addCriterion("vip_rule_timespan <>", value, "vipRuleTimespan");
            return (Criteria) this;
        }

        public Criteria andVipRuleTimespanGreaterThan(Integer value) {
            addCriterion("vip_rule_timespan >", value, "vipRuleTimespan");
            return (Criteria) this;
        }

        public Criteria andVipRuleTimespanGreaterThanOrEqualTo(Integer value) {
            addCriterion("vip_rule_timespan >=", value, "vipRuleTimespan");
            return (Criteria) this;
        }

        public Criteria andVipRuleTimespanLessThan(Integer value) {
            addCriterion("vip_rule_timespan <", value, "vipRuleTimespan");
            return (Criteria) this;
        }

        public Criteria andVipRuleTimespanLessThanOrEqualTo(Integer value) {
            addCriterion("vip_rule_timespan <=", value, "vipRuleTimespan");
            return (Criteria) this;
        }

        public Criteria andVipRuleTimespanIn(List<Integer> values) {
            addCriterion("vip_rule_timespan in", values, "vipRuleTimespan");
            return (Criteria) this;
        }

        public Criteria andVipRuleTimespanNotIn(List<Integer> values) {
            addCriterion("vip_rule_timespan not in", values, "vipRuleTimespan");
            return (Criteria) this;
        }

        public Criteria andVipRuleTimespanBetween(Integer value1, Integer value2) {
            addCriterion("vip_rule_timespan between", value1, value2, "vipRuleTimespan");
            return (Criteria) this;
        }

        public Criteria andVipRuleTimespanNotBetween(Integer value1, Integer value2) {
            addCriterion("vip_rule_timespan not between", value1, value2, "vipRuleTimespan");
            return (Criteria) this;
        }

        public Criteria andVipRuleDiscountIsNull() {
            addCriterion("vip_rule_discount is null");
            return (Criteria) this;
        }

        public Criteria andVipRuleDiscountIsNotNull() {
            addCriterion("vip_rule_discount is not null");
            return (Criteria) this;
        }

        public Criteria andVipRuleDiscountEqualTo(BigDecimal value) {
            addCriterion("vip_rule_discount =", value, "vipRuleDiscount");
            return (Criteria) this;
        }

        public Criteria andVipRuleDiscountNotEqualTo(BigDecimal value) {
            addCriterion("vip_rule_discount <>", value, "vipRuleDiscount");
            return (Criteria) this;
        }

        public Criteria andVipRuleDiscountGreaterThan(BigDecimal value) {
            addCriterion("vip_rule_discount >", value, "vipRuleDiscount");
            return (Criteria) this;
        }

        public Criteria andVipRuleDiscountGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("vip_rule_discount >=", value, "vipRuleDiscount");
            return (Criteria) this;
        }

        public Criteria andVipRuleDiscountLessThan(BigDecimal value) {
            addCriterion("vip_rule_discount <", value, "vipRuleDiscount");
            return (Criteria) this;
        }

        public Criteria andVipRuleDiscountLessThanOrEqualTo(BigDecimal value) {
            addCriterion("vip_rule_discount <=", value, "vipRuleDiscount");
            return (Criteria) this;
        }

        public Criteria andVipRuleDiscountIn(List<BigDecimal> values) {
            addCriterion("vip_rule_discount in", values, "vipRuleDiscount");
            return (Criteria) this;
        }

        public Criteria andVipRuleDiscountNotIn(List<BigDecimal> values) {
            addCriterion("vip_rule_discount not in", values, "vipRuleDiscount");
            return (Criteria) this;
        }

        public Criteria andVipRuleDiscountBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("vip_rule_discount between", value1, value2, "vipRuleDiscount");
            return (Criteria) this;
        }

        public Criteria andVipRuleDiscountNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("vip_rule_discount not between", value1, value2, "vipRuleDiscount");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}